package bairui.international.console.web.controller.index.module;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.ResponseBody;

import com.lianjing.sh.spring.web.controller.base.action.Action;
import com.lianjing.sh.spring.web.controller.enhance.output.FomatOutput;

import bairui.international.model.domain.jpa.id.ID_IndexModuleProduct;
import bairui.international.service.Service_IndexModuleProduct_Generate;

/**
 *
 * 详情
 *
 * @generated
 * 
 * @see STest_C_Index_Module_Detail_ProductDelete 测试
 *
 */
@Controller
public class C_Index_Module_Detail_ProductDelete
 extends SC_Index_Module_Detail_ProductDelete 
{
	
	@Autowired private Service_IndexModuleProduct_Generate service_IndexModuleProduct_Generate;
	
	/**
	 * 删除产品
	 */
	@Action(ProductDelete.class)
	@DeleteMapping(ProductDelete.RequestMappingValue)
	public @FomatOutput @ResponseBody Object productDelete(
		@PathVariable(name=ProductDelete.PathVariableName.Id) long id, 
		@PathVariable(name=ProductDelete.PathVariableName.ProductModuleId) ID_IndexModuleProduct productModuleId
	) throws Exception {
		service_IndexModuleProduct_Generate.deleteById(productModuleId);
		return null;
	}
	

}
